#define layout(title, keywords, description, page)
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>#(title?? '集成问答')</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="#(keywords?? 'jboot,jbootfly,jboot社区,jpress')">
    <meta name="description" content="#(description?? 'Jboot，专为大型分布式项目和微服务而生，她是一个基于JFinal 和 Undertow开发的微服务框架。')">
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/global.css">
    <link rel="stylesheet" href="/static/css/csdn.css">
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/bootstrap/select/css/bootstrap-select.css">
    <script type="text/javascript" src="/static/jquery/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/static/markdown/marked.min.js"></script>
    <!--<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/bootstrap/select/js/bootstrap-select.js"></script>-->
    <link href="/static/webuploader/webuploader.css" type="text/css"
          rel="stylesheet" />
    <script type="text/javascript"
            src="/static/webuploader/webuploader.js"></script>
   <!-- <script type="text/javascript"
            src="/static/webuploader/webuploader.nolog.min.js"></script>
-->
    <meta name="decorator" content="default" />
</head>
<body style="background-color: #e9e9e9;margin-top: 41px">

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/" style="margin-top: 6px;left:-24px">
            <img src="/static/images/right/logo.png" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs menu">
            <li class="layui-nav-item #(first==1?'first':'')">
                <a href="/enjoy"><i class="layui-this iconfont icon-ui"></i>共享</a>
            </li>
            <li class="layui-nav-item #(first==2?'first':'')" >
                <a href="/"><i class="layui-this iconfont  icon-jiaoliu"></i>问答</a>
            </li>
            <li class="layui-nav-item #(first==3?'first':'')">
                <a href="/ranklist"><i class="iconfont icon-iconmingxinganli"></i>排行榜</a>
            </li>
        </ul>

        #if(USER)
        <!-- 登入后的状态 -->
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs">#(USER.nickname ??)#if(MESSAGE_FLAG)<span class="layui-badge-dot"></span>#end</cite>
                    #if(USER.auth_info)
                    <i class="iconfont icon-renzheng layui-hide-xs" title="#(USER.auth_info)"></i>
                    #end
                    <img src="#(USER.avatar)">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/user/post"><i class="layui-icon">&#xe63c;</i>我的问答</a></dd>
                    <dd><a href="/user/setting"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                    <!--<dd><a href="/user/myupload"><i class="layui-icon">&#xe620;</i>我的上传</a></dd>-->
                    <dd><a href="/user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息#if(MESSAGE_FLAG)<span class="layui-badge-dot"></span>#end</a></dd>
                    <dd><a href="/user/#(USER.id)"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="/logout" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
        </ul>
        #else
        <ul class="layui-nav fly-nav-user">
            <!-- 未登入的状态 -->
            <li class="layui-nav-item">
                <div class="search_bar csdn-tracking-statistics tracking-click" data-mod="popu_366">
                    <input type="text" class="input_search" name="" id="toolber-keyword" autocomplete="off" placeholder="问答、共享">
                    <a   class="btn-nobg-noborder btn-search">
                        <svg class="toolbar-icon" aria-hidden="true">
                            <use xlink:href="#sousuo"></use>
                        </svg>
                    </a>
                </div>
            </li>
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="/login"></a>
            </li>
            <li class="layui-nav-item">
                <a href="/login">登录</a>
            </li>
            <li class="layui-nav-item">
                <a href="/register">注册</a>
            </li>
        </ul>
        #end
    </div>
</div>


#@content?()


<div class="fly-footer" style="border-top: 1px solid #ddd;">
    <p><a href="http://jboot.io/" target="_blank">集成问答</a> 2018 &copy; <a href="http://192.168.13.112:8080/portal-web/admin/login#"  target="_blank"> 系统集成</a></p>
</div>
<script>
   /* $(document).ready(function (){
        $(".menu li").each(function(index){
            $(this).click(function(){
                $(".menu li").removeClass("first");
                $(".menu li").eq(index).addClass("first");
            });
        });
    });*/
</script>
<script src="/static/layui/layui.js"></script>
<script>
    layui.cache.page = '#(page ?? 'jie')';
    layui.cache.user = {
        username: '#(USER.nickname ?? "游客")'
        ,uid: '#(USER.id ?? -1)'
        ,avatar: '#(USER.avatar ?? "/static/images/avatar/00.jpg")'
        ,experience: 83
        ,sex: '男'
    };
    layui.config({
        version: "3.0.0"
        ,base: '/static/mods/'
    }).extend({
        fly: 'index'

    }).use(['fly', 'face'], function(){
        var $ = layui.$
            ,fly = layui.fly;
        //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
        var editMode = '#(post!=null?post.edit_mode:"")';
        $('.detail-body').each(function(){
            var othis = $(this), html = othis.html();
            if(editMode=="markdown"){
                //othis.html(marked(fly.content(html)));
            }else{
                othis.html(fly.content(html));
            }
        });
    });
    #@script?()

</script>
</body>
</html>
#end
<style>
    .first { border-bottom: 2px solid #0086cc}
 .search_bar {
        float: right;
        width: 107px;
        height: 24px;
        line-height: 16px;
        border: 1px solid #CCC;
        border-radius: 4px;
    }

 .search_bar .input_search {
        font-size: 12px;
        color: #999;
        display: block;
        float: left;
        width: 70px;
        padding: 4px 0 4px 7px;
        border: 0;
        border-radius: 10px;
        font-weight: 300;
        background: 0 0;
    }

.search_bar .btn_clear {
        background-color: rgba(0,0,0,0);
        color: #ccc;
        padding: 0 2px;
        font-size: 14px;
        display: block;
        text-align: center;
        width: 26px;
        height: 22px;
        float: right;
        line-height: 22px;
    }

 .search_bar a {
        margin-top: 3px;
    }
 .search_bar a svg {
        width: 18px;
        height: 18px;
    }
</style>

